package com.bringway.global.service.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bringway.framework.domain.SysAttechment;
import com.bringway.global.dao.SysAttechmentDao;
import com.bringway.global.service.SysAttechmentService;

import net.sf.json.JSONObject;

/*
* @author 作者 xuef
* @version 创建时间：2015年9月11日 下午4:46:58
* 类说明
*/
@Service
@Transactional
public class SysAttechmentServiceImpl implements SysAttechmentService {
	
	@Autowired
	private SysAttechmentDao sysAttechmentDao;

	public Long createSysAttechment(SysAttechment sysAttechment) {
		return sysAttechmentDao.createSysAttechment(sysAttechment);
	}
	
	public Collection listAllAttByBizId(String bizId){
		return sysAttechmentDao.listAllAttByBizId(bizId);
	}
	
	public SysAttechment getSysAttechment(String id){
		return sysAttechmentDao.getSysAttechment(id);
	}

	public Collection listAllAttByBizId(Long bizId, String item) {
		return sysAttechmentDao.listAllAttByBizId(bizId,item);
	}

	public void copySyaAttechment(Long bizId, Long beforeBizId) {
		sysAttechmentDao.copySyaAttechment(bizId, beforeBizId);
	}

	public SysAttechment getSysAttechmentByFileName(String fileName) {
		return sysAttechmentDao.getSysAttechmentByFileName(fileName);
	}

	public void delAttByFileName(String fileName) {
		sysAttechmentDao.delAttByFileName(fileName);
		
	}

	@Override
	public Collection listAllAtt(JSONObject params) {
		return sysAttechmentDao.listAllAtt(params);
	}

	@Override
	public int getAllAtt(JSONObject params) {
		return sysAttechmentDao.getAllAtt(params);
	}
	
}
